package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Objects;

/**
 * @author: qiyr
 * @date: 2022/6/27 15:48
 * @description: 场外债券借贷交易报告实体类
 */
@Data
@Entity
@Table(name = "t_reg_rpt_interotc_a4")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(RegRptInterOtcA4.PK.class)
public class RegRptInterOtcA4 {

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @Column(name = "submit_org_name")
    private String submitOrgName;

    @Column(name = "submit_term")
    private String submitTerm;

    @Column(name = "submit_time")
    private String submitTime;

    @Id
    @Column(name = "row_id")
    private Integer rowId;

    /**
     * 交易方向
     */
    @Column(name = "jyfx")
    private String jyfx;

    /**
     * 交易所新增券面
     */
    @Column(name = "jys_xzqm")
    private Double jysXzqm;

    /**
     * 交易所期末未到期券面
     */
    @Column(name = "jys_qmwdqqm")
    private Double jysQmwdqqm;

    /**
     * 银行间新增券面
     */
    @Column(name = "yhj_xzqm")
    private Double yhjXzqm;

    /**
     * 银行间期末未到期券面
     */
    @Column(name = "yhj_qmwdqqm")
    private Double yhjQmwdqqm;

    public RegRptInterOtcA4() {
    }

    public RegRptInterOtcA4(BigInteger mainId, String submitOrgName, String submitTerm, String submitTime, Integer rowId,
                            String jyfx, Double jysXzqm, Double jysQmwdqqm, Double yhjXzqm, Double yhjQmwdqqm) {
        this.mainId = mainId;
        this.submitOrgName = submitOrgName;
        this.submitTerm = submitTerm;
        this.submitTime = submitTime;
        this.rowId = rowId;
        this.jyfx = jyfx;
        this.jysXzqm = jysXzqm;
        this.jysQmwdqqm = jysQmwdqqm;
        this.yhjXzqm = yhjXzqm;
        this.yhjQmwdqqm = yhjQmwdqqm;
    }

    public static class PK implements Serializable {
        private BigInteger mainId;
        private Integer rowId;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public Integer getRowId() {
            return rowId;
        }

        public void setRowId(Integer rowId) {
            this.rowId = rowId;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(rowId, pk.rowId);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, rowId);
        }
    }

    public BigInteger getMainId() {
        return mainId;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public String getSubmitOrgName() {
        return submitOrgName;
    }

    public void setSubmitOrgName(String submitOrgName) {
        this.submitOrgName = submitOrgName;
    }

    public String getSubmitTerm() {
        return submitTerm;
    }

    public void setSubmitTerm(String submitTerm) {
        this.submitTerm = submitTerm;
    }

    public String getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public String getJyfx() {
        return jyfx;
    }

    public void setJyfx(String jyfx) {
        this.jyfx = jyfx;
    }

    public Double getJysXzqm() {
        return jysXzqm;
    }

    public void setJysXzqm(Double jysXzqm) {
        this.jysXzqm = jysXzqm;
    }

    public Double getJysQmwdqqm() {
        return jysQmwdqqm;
    }

    public void setJysQmwdqqm(Double jysQmwdqqm) {
        this.jysQmwdqqm = jysQmwdqqm;
    }

    public Double getYhjXzqm() {
        return yhjXzqm;
    }

    public void setYhjXzqm(Double yhjXzqm) {
        this.yhjXzqm = yhjXzqm;
    }

    public Double getYhjQmwdqqm() {
        return yhjQmwdqqm;
    }

    public void setYhjQmwdqqm(Double yhjQmwdqqm) {
        this.yhjQmwdqqm = yhjQmwdqqm;
    }
}
